# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Ilya Elenskiy <elenskiy.ilya@gmail.com>
# Contributor: Julien Nicoulaud <julien.nicoulaud@gmail.com>

pkgname=python-reactivex
pkgver=4.0.4
pkgrel=3
pkgdesc='Reactive Extensions for Python'
arch=(any)
url=http://reactivex.io
license=(APACHE)
depends=(
  python
  python-typing_extensions
)
makedepends=(
  git
  python-build
  python-poetry-core
  python-installer
)
checkdepends=(
  python-coverage
  python-nose
  python-pytest
  python-pytest-asyncio
)
_tag=7187453c1a829c3f7ceeadae722f2d1d13f6b51e
source=(git+https://github.com/ReactiveX/RxPY.git#tag=${_tag})
sha256sums=(SKIP)

pkgver() {
  cd RxPY
  _version=$(git describe --tags | sed 's/^v//')
  sed "s/0.0.0/${_version}/" -i pyproject.toml
  echo "__version__ = \"${_version}\"" > reactivex/_version.py
  echo ${_version}
}

build() {
  cd RxPY
  python -m build --wheel --no-isolation
}

check() {
  cd RxPY
  python -m pytest
}

package() {
  python -m installer --destdir="${pkgdir}" RxPY/dist/*.whl
}

# vim: ts=2 sw=2 et:
